<?php
class Pageley_Domain_EnumerationTests extends Pageley_Test_Case {

	private $attribute;

	public function setUp() {
		$this->attribute = new Pageley_Domain_Attribute_Enumeration("currency", "Pageley_Basic_Domain_Currency");
	}

	public function testValueOf() {
		$eur = $this->attribute->valueOf("EUR");
		$this->assertSame(Pageley_Basic_Domain_Currency::$EUR, $eur);
	}

	public function testIndex() {
		$this->assertEquals(1, Pageley_Domain_Status::$ACTIVE->getIndex());
		$this->assertEquals(3, Pageley_Basic_Domain_Currency::$GBP->getIndex());
	}
}